import time
from django.test import TestCase
import pandas as pd
from openpyxl import load_workbook
from .yida_config import YidaClient
from reportservice.dbhelper import DBTool
import unittest

admin_user_id = "301546025724261514"
yida_client = YidaClient()

class YidaTest(TestCase):

    
    def setUp(self) -> None:
        return super().setUp()
    
    def test_yida(self):
        yida_client.get_form_items_by_ids()
    def test_query_hnjy(self):
        print("开始测试>>>>")
        pass
    
    def test_connect_sqlserver2000(self):
        import pymssql
        # 连接 SQL Server
        conn = pymssql.connect(server='192.168.1.39', port=1433, user='sa', password='xtd**)^', database='test_db')

        # 创建游标
        cursor = conn.cursor()

        # 执行查询
        cursor.execute('SELECT * FROM tb_person')

        # 获取查询结果
        rows = cursor.fetchall()

        # 打印结果
        for row in rows:
            print(row)

        # 关闭连接
        conn.close()